﻿/************************************************************************

   Extended Silverlight Toolkit

   Copyright (C) 2010-2012 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://extendedsilverlight.codeplex.com/license

   Please purchase a commercial version of this toolkit if you are using
   it in a commercial product. The commercial versions support the project,
   and also include more features for each control, priority support,
   source code, updates, removed watermark, and a proprietary license.

   Visit http://xceed.com and follow @datagrid on Twitter.

  **********************************************************************/


namespace Xceed.Silverlight.Data
{
  internal interface ICachingEnumerator
  {
    int CacheSize
    {
      get;
    }

    // Set the cache size. If needed, a trim will occur.
    // In the case of a trim, the item-remove priority is the following:
    // 1. Items at the top of the cache, up to the current position
    // 2. Items at the bottom of the cache.
    void SetCacheSize( int size );

    // Set the cache size. If needed, a trim will occur.
    // In the case of a trim, some items will be removed from the top and others 
    // from the bottom.
    // topTrimRatio tells the ratio of items that should be removed at the 
    // top of the cache. The remaining will be removed from bottom.
    void SetCacheSize( int size, double topTrimRatio );

    void SetCacheSize( int size, SourcePosition topLimitTrim );
  }
}
